]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Update workspace struts even while starting up
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 25 Feb 2021 13:35:30 +0000 (10:35 -0300)
committerMarge Bot <marge-bot@gnome.org>
Tue, 2 Mar 2021 23:14:07 +0000 (23:14 +0000)
We want to avoid updating the input region on startup, since it incurs
in roundtrips to the X server, but not workspaces struts, since they
affect the visible clip of wallpapers in the workspace. Since next
commits will make the overview be the after-boot screen, we really
don't want the wallpaper to be clipped wrongly.

Allow updating regions while starting up, but only workspace struts.
Make sure input is not updated by accounting for 'this._startingUp'
on 'wantsInputRegion'.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1678>

js/ui/layout.js

index bf251ba0006a464e330e10a85623700f3cc5628b..f35787a3045ef06fb5ed2b3bf71b3078a2566ffc 100644 (file)
@@ -918,9 +918,6 @@ var LayoutManager = GObject.registerClass({
     }
 
     _queueUpdateRegions() {
-        if (this._startingUp)
-            return;
-
         if (!this._updateRegionIdle) {
             this._updateRegionIdle = Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
                                                     this._updateRegions.bind(this));
@@ -960,6 +957,7 @@ var LayoutManager = GObject.registerClass({
         let rects = [], struts = [], i;
         let isPopupMenuVisible = global.top_window_group.get_children().some(isPopupMetaWindow);
         const wantsInputRegion =
+            !this._startingUp &&
             !isPopupMenuVisible &&
             Main.modalCount === 0 &&
             !Meta.is_wayland_compositor();